import { post } from '@/utils/request'
// 保存页面数据
export const saveMicroPage = p => post(`/service-cms/b/page/v1/pageModule/save`, p)
// 删除页面数据
export const deleteMicroPage = p => post(`/service-cms/b/page/v1/pageBase/del/${p.id}`, p)
// 获取商城首页数据
export const getMicroPage = p => post(`/service-cms/b/page/v1/pageModule/viewPage/mallHome`, p)
// 获取商品首页数据
export const getMicroPageCompotentDetail = p => post(`/service-cms/b/page/v1/pageModule/pageModuleData/${p.id}`, p)
// 获取首页商品组件数据
export const newGetMicroPageCompotentDetail = p => post(`/service-cms/b/page/v1/pageModule/pageModuleDataSelQuery`, p)
// 获取页面列表
export const getmicroPageList = p => post(`/service-cms/b/page/v1/pageBase/customPageList`, p)
// 获取页面组件列表
export const queryAllComponentsList = p => post(`/service-cms/b/page/v1/pageComponents/queryAllComponents`, p)
// 更改自定义页面状态
export const updateStates = p => post(`/service-cms/b/page/v1/pageBase/changeStatus/${p.id}/${p.status}`, p)
// getOtherMicroPage 获取非首页页面数据
export const getOtherMicroPage = p => post(`/service-cms/b/page/v1/pageModule/viewPage/${p.id}`, p)
// getCanChoosePage 获取可选择页面列表
export const getCanChoosePage = p => post(`/service-cms/b/page/v1/pageBase/effectiveByTypePageList`, p)
// getActivityPage
export const getActivityPage = p => post(`/service-marketing/b/campaign/v1/effectiveCampaignPageList`, p)
// 查看页面 /service-cms/b/page/v1/pageModule/viewPageByCategory/{pageCategory}
export const viewPageByCategory = p => post(`/service-cms/b/page/v1/pageModule/viewPageByCategory/${p.id}`, p)
// 查看页面组件子内容分页列表 /service-cms/b/page/v1/pageModule/pageModuleChildDataPageList
export const pageModuleChildDataPageList = p => post(`/service-cms/b/page/v1/pageModule/pageModuleChildDataPageList`, p)
// 悬浮导航设计=>保存配置接口
export const getPageSuspendedNavigation = p => post(`/service-cms/b/page/v1/pageModule/viewPageByCategory/${p.id}`, p)
// 页面模板管理
// 保存为模板
export const saveMicroPageTemplate = p => post(`/service-cms/b/pageTemplate/v1/pageTemplateBase/saveToTemplate`, p)
// 获取模板列表
export const getMicroTemplatePageList = p => post(`/service-cms/b/pageTemplate/v1/pageTemplateBase/pageTemplateBasePageList`, p)
// 页面导入模板
export const loadMicroTemplate = p => post(`/service-cms/b/pageTemplate/v1/pageTemplateBase/loadTemplate`, p)
